-
-
Notifications
You must be signed in to change notification settings - Fork 237
Working in-progress v3 #2387
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Working in-progress v3 #2387
Conversation
version 3 still in early status, and should contains physics2d when publish. |
Will be nice if we have a single json library easy to use, like |
7b071d4
to
c672b49
Compare
The |
I need rapidjson performance as well, please do not remove 😅 |
I don't understand how a JSON lib in a game engine needs such an absurd performance, since things like that are used in few moments, like loading or saving things at specific times. In our app (Ubook) that uses JSON all the time and processes thousands of JSON data with thousands of records, the processing is instantaneous, even in huge JSON data and we use nloman/json. Before we used rapid, but it doesn't have as many features, requiring other libs to be used and more things to be maintained, decreasing efficiency in exchange for NOTHING. For me, it would make sense to keep a single lib that is easy to use and that for our scenario here at Axmol, will not affect anything in practice. Here is my opinion based on my reality as someone who uses this in practice and in large volumes, both on Android and iOS, as well as on Apple Watch and Apple TV and also on the desktop. |
If it is removed from Axmol, then you can easily add it into your own projects with a few lines of CMake code, and nothing else has to change in your projects. |
Your projects may not require the speed of libraries like rapidjson, but that may not apply to projects by others, since they may have completely different requirements.
There are cases where the speed of parsing needs to be as quick as possible, such as in event handlers, comms response handlers, etc. etc.. In these cases, speed definitely does matter, and it is quite noticeable if the parsing takes too long.
That may be the case for your own projects, but again, it may not apply to projects by others. Also, just because a specific library works for you, it doesn't mean that it is appropriate for it to be used in Axmol.
That's all well and good, and as you stated, your opinion is based on the requirements of your own projects, but it's not really appropriate to make statements about what other developer should or shouldn't use in their projects, because you really don't know what their requirements are. The engine should bundle whatever json library (or libraries) it requires, but that in no way forces the developers using Axmol to also use those libraries. Developers are free to use whatever library they want to use. On a side note, many developers who use Axmol for their released projects have never posted on this discussion board, and may not even read these threads, so unfortunately, it would be hard to get their feedback on such things. |
Finally, maybe |
The problem with nlohman/json is not only its lack of runtime speed but it's also a huge >10k thousand long header only library, making compilation also slower. its really one of the worst options you can choose. In modern C++ there is a clear new winner in my opinion: glaze is a modern C++ json library with automatic serialization/deserialization, making it really convenient for simple use cases. The performance is on par with simdjson. For non reflection uses, there is generic json which is similar to nlohman in that regard. There are a few cons, thought: |
Hi, Glaze is nice too. Their syntax is like nlohman/json and is easy to use. My concern is always to keep the engine as easy as possible for people to use. It's better to use Glaze, which already does everything, than to have to adopt several libraries and increase complexity, lowering the barrier to entry. |
I tried glaze, but compile fails |
8c3f108
to
d46bafc
Compare
395cff7
to
ad0a279
Compare
0b8a844
to
8d559ff
Compare
I was wondering if v3 wouldn't be a good time for more breaking changes, like getting rid of the In the same vein, what do you think of enforcing the code formatting in the CI by running a clang-format check on each PR? |
* [RHI] Add sampler2DArray support * [RHI] Add sampler2DArray support, adpot mipmaps * [RHI] Add sampler2DArray support, adpot RenderTexture * [RHI] Add sampler2DArray support, adpot etc1 with alpha rendering * [RHI] Add sampler2DArray support, adpot context loss recovery * [RHI] Add sampler2DArray support, improve code style
…sprite sheet incorrect
The d3d11 will not fill missing a_position comp z,w like opengl, so need matched shader to render 2d nodes: ProgressTimer, MotionStreak, Grid, Texture2D
* Improve VertexLayout management * Unify instance draw shader * Update d3d shader compile inital optimize flag * comment vertex input binding cache [skip ci]
* Re-add ProgramState setTextureArray feature and do improvement * OMG, the d3d11 terrain rendering works as expected And previous revision does't work as expected due to texture binding slots incorrect * Restore `ProgramState::setTextureArray` * Improve Terrain rendering, use `uniform sampler2D u_details[4]` to store detailMap textures * Improve Terrain rendering, set alphaMap, lightMap dummy texture RHI independent when they are not used * Fix Terrain rendering doesn't work when use d3d11 * Fix vertex attribute binding cache incorrect * Use macos-14 for ios ci due to unexpected compile error * Upgrade MSL version: 1.2 => 2.0 (requires macos13 and ios 11+) for supporting texture array `sampler2D u_details[4]`
This PR is for ci check only, since we try to update branch mangement: enable ci for dev/, release/, this PR can closed, v3 roadmap, please see: #2650 |
auto run clang-foramt check is a good idea. |
should finish by PR: #2654 |
If I understood #2654 correctly it creates a new commit which formats the code on each PR. This is imho a bad solutions as those commits will pollute the history with meaningless changes, complexifying |
at least, first time, we can format all sources |
Describe your changes
Previous working PR #2204 was closed due to branch name renamed from
3.x
towip-v3
cpp-tests
works on box2d v3cpp-tests
works on box2d v3core/physics
based on chipmunkcpp-tests
cpp-tests
std::views::split
can be use to improve performancestd::filesystem
chrome://flags/#enable-webassembly-memory64
Color4B
=>Color32
Color3B
opengl-es-3.0
METAL
,GLES2
, then addAXSLC_TARGET_[GLSL,HLSL,MSL,GLES]
sampler2D texs[4]
support, 2.x only support OpenGL, now support all RHI: d3d11, metal, opengl(es)PhysicsJointXXX::construct
=>PhysicsJointXXX::instantiate
simdjson for parse only and simdjson build in-progress: https://github.com/simdjson/experimental_json_builder
finally solution:
yyjson
+simdjson
Sprite
Issue ticket number and link
Checklist before requesting a review
For each PR
Add Copyright if it missed:
-
"Copyright (c) 2019-present Axmol Engine contributors (see AUTHORS.md)."
I have performed a self-review of my code.
Optional:
For core/new feature PR